<?php $this->renderPartial('/admin/menu/users');?>
<h4><?php echo Yii::t('helpdesk','Set Permissions For Staffs'); ?></h4>
<?php 
foreach(Yii::app()->user->getFlashes() as $key => $message){
	echo '<div class="'.$key.'"><p>'.$message."</p></div>\n";
}
?>
<?php if(!empty($arrPermissions)): ?>
<form role="form" id="my-account" class="form-horizontal" method="post">
<div class="form-group">
	<?php foreach($arrPermissions as $R): ?>
	<div class="col-sm-offset-1 col-sm-6">
        <div class="checkbox">
        	<label><input type="checkbox" <?php if(!empty($R['value'])): ?>checked="checked"<?php endif; ?> value="<?php echo $R['permission_id']; ?>" id="permission_<?php echo $R['permission_id']; ?>" name="permission[]"> <?php echo Yii::t('helpdesk',$R['permission_name']); ?></label>
        </div>
	</div>
    <?php endforeach; ?>   
</div>
<div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
      <input type="submit" class="btn btn-primary btn-large" value="<?php echo Yii::t('helpdesk','Update'); ?>">
    </div>
</div>
</form>
<?php else: ?>
<div class="form-group"><?php echo Yii::t('helpdesk','No data found'); ?></div>
<?php endif; ?> 